%%
%练习2.1
%1
x=-10:0.1:10;
y = nthroot(x,3) ;
%plot(x,y,'m--');
%%
%2
th = -x.^2;
y2 = exp(th);
plot(x,y2,'m--')
%%
%3
%t=-10:0.1:10;
syms x y
f = x.^3+y.^3-3.*x.*y;
ezplot(f);
%%
%4
t = -10:0.1:10;
th = 1+t.^2;
x = (t.^2)./th;
y = (t.^3)./th;
plot(x,y);
%另一种写法
syms x y
ezplot(y.^2-(x.^3./(1-x)));
%%
%5
t = -10:0.1:10;
x = t-sin(t);
y = 2*(1-cos(t));
plot(x,y);
%%
%6
syms x y
ezplot(x^(2/3)+y^(2/3));
%
t = -10:0.1:10;
x=cos(t).^3;
y=sin(t).^3;
plot(x,y);
%%
%7
t = -10:0.1:10;
x = cos(t);
y = 2*sin(t);
z = 3*t;
plot3(x,y,z);
grid on
%%
%8
i = 0:0.1:2*pi;
r = i;
%polar(i,r);
%%
%9
t = exp(r);
polar(i,t);
%%
%10
x = 0:0.1:2*pi;
y = cos(2*x).^(0.5);
polar(x,y);
%%
%11
x = 0:0.1:2*pi;
r = 1+cos(x);
polar(x,r);


















